package cn.iocoder.yudao.module.product.controller.app.spu.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class AppProductPriceRespVO {
    @Schema(description = "价格(分)", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer price;
    @Schema(description = "原价(分)", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer marketPrice;
    @Schema(description = "优惠列表", requiredMode = Schema.RequiredMode.REQUIRED)
    List<Discount> discounts;

    @Schema(description = "商品SKU ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long skuId;

    @Data
    public static class Discount {
        @Schema(description = "优惠属性名", requiredMode = Schema.RequiredMode.REQUIRED)
        private String propertyName;
        @Schema(description = "优惠属性值", requiredMode = Schema.RequiredMode.REQUIRED)
        private String propertyValue;
        @Schema(description = "优惠描述", requiredMode = Schema.RequiredMode.REQUIRED)
        private String promotion;
    }

    public AppProductPriceRespVO() {
        setDiscounts(new ArrayList<>());
    }
}
